/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.mavenproject1;

/**
 *
 * @author JONATHAN
 */
import java.io.IOException;

import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;

import org.apache.ws.security.WSPasswordCallback;

public class ClientPasswordHandler implements CallbackHandler {

   public void handle(Callback[] callbacks) throws IOException,
         UnsupportedCallbackException {

      WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
      pc.setPassword("password");
   }

}
